/*!
 * \file BaseTypeUI.h
 * \date 8-25-2011 13:21:17
 * 
 * 
 * \author zjhlogo (zjhlogo@gmail.com)
 */
#ifndef __BASETYPEUI_H__
#define __BASETYPEUI_H__

#include "../BaseTypeEx.h"
#include "../math/IMath.h"

enum UI_TOUCH_EVENT_TYPE
{
	UTET_UNKNOWN,
	UTET_BEGIN,
	UTET_MOVE,
	UTET_END,
};

typedef struct CHAR_INFO_tag
{
	int nID;
	float width, height;
	float u, v, du, dv;
	ITexture* pTexture;
	float offsetx, offsety, advance;
	int nRef;
} CHAR_INFO;

enum UI_RENDER_STATE
{
	URS_ENABLE = 0x00000001,
	URS_DEFAULT = URS_ENABLE,

	URS_FORCE_32BIT = 0x7FFFFFFF,
};

enum DEFAULT_UI_STYLE
{
	DUS_BUTTON_DEFAULT = 0,
	DUS_BUTTON_PRESSED = 1,
	DUS_BUTTON_DISABLED = 2,
	DUS_BUTTON_NUM = 3,

	DUS_CHECKBUTTON_CHECK = 0,
	DUS_CHECKBUTTON_CHECK_PRESSED = 1,
	DUS_CHECKBUTTON_CHECK_DISABLED = 2,
	DUS_CHECKBUTTON_UNCHECK = 3,
	DUS_CHECKBUTTON_UNCHECK_PRESSED = 4,
	DUS_CHECKBUTTON_UNCHECK_DISABLED = 5,
	DUS_CHECKBUTTON_NUM = 6,

	DUS_RADIOBUTTON_CHECK = 0,
	DUS_RADIOBUTTON_CHECK_PRESSED = 1,
	DUS_RADIOBUTTON_CHECK_DISABLED = 2,
	DUS_RADIOBUTTON_UNCHECK = 3,
	DUS_RADIOBUTTON_UNCHECK_PRESSED = 4,
	DUS_RADIOBUTTON_UNCHECK_DISABLED = 5,
	DUS_RADIOBUTTON_NUM = 6,

	DUS_SLIDERBAR_THUMB_DEFAULT = 0,
	DUS_SLIDERBAR_THUMB_PRESSED = 1,
	DUS_SLIDERBAR_THUMB_DISABLED = 2,
	DUS_SLIDERBAR_FOREGROUND = 3,
	DUS_SLIDERBAR_BACKGROUND = 4,
	DUS_SLIDERBAR_NUM = 5,
};

enum IMAGE_FRAME_BLOCK
{
	IFB_TOP_LEFT = 0,
	IFB_TOP_CENTER,
	IFB_TOP_RIGHT,
	IFB_MIDDLE_LEFT,
	IFB_MIDDLE_CENTER,
	IFB_MIDDLE_RIGHT,
	IFB_BOTTOM_LEFT,
	IFB_BOTTOM_CENTER,
	IFB_BOTTOM_RIGHT,
	IFB_NUM,
};

typedef struct IMAGE_FRAME_tag
{
	const IMAGE_PIECE* pImagePiece[IFB_NUM];
} IMAGE_FRAME;

#endif // __BASETYPEUI_H__
